import Helps from '@/views/side/Helps.vue'
import SiteManage from '@/views/side/SiteManage.vue'
import UserManage from '@/views/side/UserManage.vue'
import { reactive } from 'vue'
import MessageManage from '../side/MessageManage.vue'


const draws = {
  site:{name: '站点管理', icon: 'icon-zhandian', component: SiteManage},
  user:{name: '用户管理', icon: 'icon-yonghu', component: UserManage},
  // {name: '信息管理', icon: 'icon-xinxifill', component: MessageManage},
  help:{name: '帮助文档', icon: 'icon-icon_help', component: Helps},
}

export const drawViewData=reactive({
  show:false,
  title:'',
  component:''
})

export const showView=(type:any)=>{
  let draw = draws[type];
  if (!draw){
    return
  }
  drawViewData.title=draw.name
  drawViewData.component=draw.component
  drawViewData.show=true;
}

export const hidden=()=>{
  drawViewData.show=false;
}
